from django.db import models

# Create your models here.

class User(models.Model):
    username = models.CharField(max_length=20,null=True)
    vip = models.IntegerField(null=True)
    jifen = models.IntegerField(default=10,null=True)

class Goods(models.Model):
    kname = models.CharField(max_length=30,null=True)
    price = models.IntegerField(null=True)
    men = models.IntegerField(null=True)

class GouWu(models.Model):
    gname = models.CharField(max_length=30,null=True)
    gprice = models.IntegerField(null=True)
    user = models.ForeignKey(User,on_delete=models.CASCADE)
    goods = models.ForeignKey(Goods,on_delete=models.CASCADE)







